Part Number Hot Search : 
121KL 1E106 84225 CRB32C1 NTE15 MC14490F PT801 SK702
Product Description
Full Text Search
 

To Download PONE-000-01 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  d-cw-0100-0 4 page 1 of 56 ceway ? is a family of chips developed by domosys corp oration to meet the requirements of the residential and commercial local area networks (lan s ). the ceway pl-one is the ideal device for simple nodes, such as switches, actuators and sensors. it integrates the complete physical layer of the cebus s tandard (eia-600) and a n m8052 core micro controller. it provides you with all of the resources you need to embed the upper layers of the cebus s tandard and the user application into a single - chip solution. the ceway pl-one is designed for superior performance in noisy power line environments. 6 7 52 27 18 17 16 15 14 13 12 11 10 9 8 28 29 30 31 32 33 53 54 55 56 57 58 59 60 3 4 5 p1.2 p0.1 p1.3 p1.4 p1.5 vdd p0.2 p0.3 p0.4 p0.5 p0.6 p0.7 rsvd p1.7 vdd p2.6 vdd p2.7 xtal2 selclk xtal1 vdd rsvd ale psen* rsvd rsvd cebout vss vdd p1.1 p0.0 ceway tm pl - one cw00i0a domosys corp. 703123 26 25 24 23 22 21 20 19 p2.0 p2.1 p2.2 p2.3 p2.4 p2.5 vss p1.6 67 68 2 1 64 65 66 p3.7 reset* vss p1.0 vref rsvd agnd 61 62 63 avcc cebin rsvd 44 45 46 47 48 49 50 51 rsvd cebam rsvd rsvd rsvd rsvd test vss 34 35 36 37 38 39 40 rsvd vss p3.3 rsvd p3.0 p3.6 p3.4 41 42 43 rsvd p3.1 p3.5 figure 1 pin-out for ceway pl-one features cebus p ower l ine physical layer power l ine m edium d ependent physical and s ymbol e ncoding sublayers proprietary dsp for s uperior s ignal r eception in n oisy e nvironments m8052 c ore m icrocontroller 4 sfrs for c ommunication b etween plses and m8052 up to 64 kb of external data memory 256 bytes of internal data memory up to 64 kb of external code memory (can be extended with bank switching) three 16-bit timer/counters full-duplex serial port 15 i /o pins 68-pin plcc p ackage industrial operating temperature range
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 2 of 56 ceway pl-one block diagram receiver transmitter symbol encoding m8052 core sfrs ram 256 bytes p0 selclk cebout cebam cebin vref reset* power supply osc xtal1 xtal2 avcc agnd vdd vss nc rsvd p1 p2 p3 psen* ale plse interrupt test figure 2 ceway pl-one block diagram
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 3 of 56 pin descriptions table 1 ceway pl-one pin descriptions symbol pin description p0.0 ? p0.7 5, 7, 12, 13, 14, 15, 16, 17 port 0: 8-bit bi-directional i/o port port pin alternative f unction p0.0 a/d0 p0.1 a/d1 p0.2 a/d2 p0.3 a/d3 p0.4 a/d4 p0.5 a/d5 p0.6 a/d6 p0.7 a/d7 p1.0 ? p1.7 2, 4, 6, 8, 9, 10, 26, 27 port 1: 8-bit bi-directional i/o port port pin alternative f unction p1.0 t2 p1.1 t2ex p1.2 - p1.3 - p1.4 - p1.5 - p1.6 - p1.7 - p2.0 ? p2.7 19, 20, 21, 22, 23, 24, 29, 31 port 2: 8-bit bi-directional i/o port port pin alternative f unction p2.0 a8 p2.1 a9 p2.2 a10 p2.3 a11 p2.4 a12 p2.5 a13 p2.6 a14 p2.7 a15 port 3: 7-bit i/o port. 2 bi-directional pins, 3 outputs, and 2 inputs. output pins always read as 0. p3.0, p3.1 p3.3 ? p3.7 38, 42, 36, 40, 43, 39, 67 port pin p3.0 p3.1 p3.2 p3.3 p3.4 p3.5 p3.6 p3.7 alternative f unction rxd txd int0: not available e xternally, used for plses interrupt. int1 t0 t1 wr* rd* direction bi-directional bi-directional n/a input output input output output xtal2 32 crystal 2: output to the inverting oscillator amplifier that forms the oscillator.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 4 of 56 symbol pin description xtal1 33 crystal 1: input to the inverting oscillator amplifier that forms the oscillator. cebam 45 output: digital output used to enable and disable the transmit amplifier. cebout 59 cebus power line signal output cebin 62 cebus power line signal input selclk 52 selclk: must be connected to vdd if 14.31818 mhz is used. connected to vss if 21. 4772 mhz is used. psen* 56 psen*: read s strobe to the external program memory via port 0 and port2. ale 55 ale: latches the low byte of the address during access of external memory in normal operation. vref 64 input for analog reference. a 1 m f capacitance must be put between this pin and agnd. reset* 68 reset: a low on this pin for 24 machine cycles and while the oscillator is running resets the device. this pin has an internal pull - up resistor. note that, unlike most 8051 devices, no internal schmitt trigger is present on this pin. agnd 66 ground: 0 volt analog reference vdd 3, 11, 28, 30, 53 power supply: digital 5 volts vss 1, 25, 35, 51,60 ground: 0 volt digital reference avcc 61 power supply: analog 5 volts rsvd 18, 34, 37, 41, 46, 47, 48, 49, 50 , 54, 57, 58, 63, 65 reserved - must be connected to vss . test 44 test: must be connected to vss.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 5 of 56 electrical specifications absolute maximum rating 1 parameter sym min max units test conditions supply voltage v dd - v ss -0.3 7 v dc input voltage v in -0.3 vdd +0.3 v dc input current i in -10 +10 ma storage temperature t stg -40 +125 o c esd tolerance 2 kv 1 exceeding these values may cause permanent damage. functional operation under these conditions is not implied. dc electrical characteristics - voltages are with respect to vss unless otherwise stated parameter sym min typ 2-3 max units test conditions supply voltage - digital vdd 4.75 5 5.25 v supply voltage - analog avcc 4.75 5 5.25 v input voltage (high) v ih 0.7vdd vdd+0.3 v input voltage (low) v il vss-0.3 0.3vdd v output voltage (high) v oh 2.4 v i oh = 50 m a output voltage (low) v ol 0.4 v i ol = 4 ma operating current digital i vdd 25 35 ma f clk = 14.318 mhz operating current analog i avcc 9.5 15.5 ma f clk = 14.318 mhz operating temperature t o -40 +85 o c 2 typical figures are at 25 oc and are for design aid only: not guaranteed and not subject to production testing. 3 dc electrical characteristics are over recommended temperature range & recommended power supply voltages. ac electrical characteristics parameter sym min typ 4 max units test conditions cebout output voltage v cebout 3.5 v p-p cebout load impedance zl cebout 5 k w cebin input impedance zin cebin 40 68 140 k w clock frequency 5 f clk 14.318 18 21.477 2 mhz pin capacitance xtal1,xtal2 c xtal 0.8 pf input pin capacitance c i 8 pf f clk = 14.318 mhz output pin capacitance c o 8 pf f clk = 14.318 mhz 4 typical figures are at 25 oc and are for design aid only: not guaranteed and not subject to production testing. 5 clock frequency can only be either 14.31818 or 21.4772 mhz for proper chirp timing.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 6 of 56 packaging ordering information part number description PONE-000-01 ceway pl-one integrated circuit
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 7 of 56 cebus standard implementation the ceway pl-one fully implements the cebus standard power line physical layer (phyl) using dedicated circuitry. the physical layer is composed of a medium dependant physical sublayer (mdps) and of a power line symbol encoding sublayer (plses). it also provides a n m8052 core microco n troller on-chip with which the upper layers (dll, nl, and al) of the cebus standard or home plug & play specification can be run . libraries that implement these upper layers are available in cebox? , the domosys? software system . medium dependent physical sublayer & power line symbol encoding sublayer the transceiver (mdps and plses) is composed of a transmit chain and a receive chain. the transmitter provides an analog representation of a stored rom code to an off-chip amplifier for transmission. upon reception, the device samples the incoming filtered waveform through an adc and provides a bit - by - bit comparison with an internally stored set of waveform probabilities. when a digital threshold is exceeded, the bit is stored with the rest of the message. the symbol decoder performs leading zero suppression and recognizes the preamble eof (peof) string in order to force the device into the receive state. the symbol decoder recognizes the incoming signals from the transversal filter and prepares them for storage in ram. the mdps and plses embed a part of the layer system management (lsm). detailed information on the cebus power line physical layer can be found in the following documents: eia 600.31 is 60.03 parts 7 & 8
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 8 of 56 m8052 to physical layer interface even though the physical layer is also composed of the mdps, the pl-one firmware only communicates with the plses through 4 special function registers (sfrs). the plses then communicates with the mdps if need be. power line symbol encoding sublayer (plses) the main task of the plses is to encode/decode a sequence of symbols into/from a stream of states. in addition, it has the task of recognizing the beginning of an incoming frame, and preventing a frame collision when the pl-one firmware requests the channel for a transmission. sometimes it must suppress leading zeros in a given field before transmitting it, or restore them when receiving it. it also computes the crc checksum appended to the end of a frame while transmitting or receiving it to ensure communication integrity. the plses will also detect jabber conditions, defined as the transmission or reception of 1,000 consecutive superior states on the medium, and indicates this via a plses handshake interrupt. a timestamp can also be provided following any reception or transmission. the plses operates in four main states: initialization (init), reception (rcv), transmission (xmit) and idle (idle). the rcv and xmit states can be divided into sub-states as shown in figure 3 state transition diagram for plses . the data travel between the plses and the m8052 through four special function registers (sfrs). each one is 8 - bit wide. they are denoted: ph_confirm_reg, ph_request_reg, ph_rx_buffer and ph_tx_buffer. when a communication is requested by the plses to the pl-one firmware, an interrupt (int0) is sent to the m8052. the latter then reads the flags in the ph_confirm_reg sfr to determine the type of interrupt service routine to execute. the description of all flags is shown in table 3 . on the other hand, when the pl-one firmware requests an action by the plses, the former writes a control value to the ph_request_reg. the description and the configuration of each of the control bits is shown in table 6 . data travels from the m8052 to the plses through the ph_tx_buffer sfr one byte at a time. similarly, the data is read by the pl-one firmware through the ph_rx_buffer sfr one byte at a time. ph_rx_buffer it is used to pass on the packet data symbols. it should be pointed out that when the leading zero suppression function has been carried out, the empty positions are padded with zeros. it is also used to pass up both the reception and transmission timestamp bytes. ph_confirm_reg the value s of the 6 lsbits of this port are valid for exactly one read cycle after receiving a plses handshake interrupt. when this port has been read once , the lsbits? values will not necessarily be valid until the next time a plses handshake interrupt is received. the 2 msbits ( ch_active and ch_noisy ) of this port are always valid.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 9 of 56 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ph_confirm_reg 0 jabber 0 rx_del 0 0 rx_del 1 0 gd/packet 0 be/bf 0 col/rx 0 ch_noisy 0 ch_active table 2 ph_confirm_reg in idle state bits in ph_confirm_reg bit description ch_active (msb) description : channel active indicates the presence of a cebus- like signal on the channel. hardware (hw)reset state : 0 enable trigger : set to 1 whenever a chirp is detected on the medium. it is maintained as long as chirps continue to be detected. this includes the special behavior described for the ph_confirm_reg col/rx flag. it is also maintained while plses receive s one symbol and is trying to identify a symbol noise condition as described for the ph_confirm_reg ch_noisy flag. reset trigger : it is reset as soon as the reception of a packet ends (after the reception of the crc or after a carrier lost), when already within the rcv state. if in the idle state, it means it was activated from a symbol noise . i t sh ould then be reset as soon as ch_noisy is enabled. ch_noisy description : channel noisy . in idle state, it indicates the presence of an isolated strong peak on the channel (symbol noise). at the transition from idle to the rcv state, it indicates a frame buried in noise (medium noisy). during the rest of the rcv state, it indicates the loss of the carrier (carrier lost). hw reset state : 0 enable trigger : symbol noise: set to 1 when one superior preamble symbol, or 1 peof delimiter symbol, followed by 5 consecutive inferior preamble symbols (1.14 usts) have been detected. as soon as the 5 th consecutive symbol is identified as an inferior , ch_noisy is set to 1. medium noisy: it is also set to 1 when only 3 to 6 (inclusive) peof symbols were detected. carrier lost: it is set to 1 when, after having received at least a peof and any other symbols after that peof, and before a complete crc has been received, an inferior state is detected on the medium. reset trigger : in a symbol noise condition, it is reset as soon as a new chirp is detected. if no new chirps are detected, or for the two other conditions, it is reset when the plses handshake interrupt is reset.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 10 of 56 bits in ph_confirm_reg bit description col/rx description : collision/reception. in the xmit state, it indicates the detection of a collision with another frame during the transmission of the preamble field. in the rcv state, it indicates that you are past the preamble and peof and into the body of a packet. hw reset state : 0 enable trigger : set to 1 when a collision is detected during transmission of the preamble (when the plses transmits an inferior but detects a superior state on the medium ) . also set to 1 as soon as the plses has detected a peof in reception, and remains at 1 throughout the reception. it remains enabled for a carrier lost indication. reset trigger : it is reset when the plses handshake interrupt is reset. special constraints : following a collision the plses will automatically transition from its xmit state to its rcv state. at the same time, ch_active is enabled since a superior preamble symbol has been detected over our inferior preamble symbol. be/bf description : buffer empty/buffer full . in xmit state, it indicates that the ph_tx_buffer has been transmitted successfully and is empty. this flag is also set to 1 when the crc checksum has been appended to the end of the frame and transmitted. in rcv state, it indicates that the data within the ph_rx_buffer is valid. hw reset state : 0 enable trigger : set to 1 after the plses has transmitted on the medium a previous packet field part, via a request with the ph_request_reg. set to 1 when the plses has stored packet preamble symbols or data symbols in the ph_rx_buffer. reset trigger : it is reset when the plses handshake interrupt is reset. gd_packet description : good packet . in rcv state, it indicates that no error has been detected in the crc checksum. if it is not set after having received the crc, it means that the incoming packet was corrupted during the communication. hw reset state : 0 enable trigger : set to 1 after the last crc symbol has been received and the crc checksum has been verified as successful. reset trigger : it is reset when the plses handshake interrupt is reset.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 11 of 56 bits in ph_confirm_reg bit description rx_del 1 rx_del 0 description : reception delimiters . in rcv state, this pair of bits indicates the type of delimiter which terminates the current byte. their configuration is shown below in table 4 . hw reset state : 00 enable trigger : set to 11 when a peof symbol has been detected and received. set to 10 when an eop symbol has been detected and received. also set to 10 after the crc has been received and the checksum result is available, or set to 10 when the reception timestamp bytes are being passed to the pl-one firmware. set to 01 when an eof symbol has been detected and received. set to 00 when 8 consecutive packet data symbols have been saved in ph_rx_buffer before receiving an eof or eop delimiter symbol. this case can happen for any packet field part, including those transmitted with leading zero suppression (lzs). also set to 00 when a peof symbol has been received but fewer than 8 preamble symbols were detected. this situation is likely to happen with a medium noisy indication (see ch_noisy bit). reset trigger : it is reset when the plses handshake interrupt is reset. jabber (lsb) description : jabber detect . in xmit state, it indicates that the pl-one has transmitted at least 1,000 consecutive superior symbols. in rcv state, it indicates that the pl-one has received at least 1,000 consecutive superior symbols. hw reset state : 0 enable trigger : set to 1 after the pl-one has transmitted at least 1,000 consecutive superior symbols. also set to 1 after the pl-one has received at least 1,000 consecutive superior symbols. reset trigger : it is reset when 1024 consecutive superior states have been detected on the channel in either transmission or reception. table 3 explanation of bits in ph_confirm_reg sfr symbol del 1 del 0 # usts eof 0 1 3 eop 1 0 4 peof 1 1 8 no delimiter 0 0 0 table 4 bit r epresentation of f our p ossible d elimiters (eof, eop, peof, and none)
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 12 of 56 plses handshake interrupt generation the pl-one firmware is supplied with an interrupt from the plses which is called the ?plses handshake interrupt?. this uses the standard 8052 int0* interrupt. this means that the port bit p3.2 is no longer available for the user application. p3.2 will normally read as 1, but will fall to 0 as soon as an interrupt is generated from the plses. it will remain at 0 until the ph_confirm_reg is read. n ote that this interrupt (int0) must be set to the high priority level to ensure that no packets are lost. for this interrupt to be properly configured, the following four bits need to be set: px0: sets int0 to high priority it0: int0 triggers on a falling edge ex0: int0 is enabled ea: enable interrupts the plses handshake interrupt is used by the pl-one firmware to perform its communication handshake with the plses, and may indicate that valid data is present in the ph_rx_buffer. it is provided by plses based on some specific plses states and events. these are defined in table 7 . the ph_confirm_reg needs to always be read to determine the cause of the interrupt, and to process it accordingly. the plses handshake interrupt is reset only after a plses handshake interrupt has been generated, followed by the reading of the ph_confirm_reg. note that the plses handshake interrupt needs to have been generated first, in order to distinguish between the ph_confirm_reg being read by the user application while in its main processing. this can be shown as follows: 1. plses handshake interrupt is generated 2. ph_confirm_reg is read 3. the plses handshake interrupt is reset ph_tx_buffer the ph_tx_buffer is used to pass initialization parameters and data to be transmitted down to the plses. setting the lzs bit in ph_request_reg will result in all leading zeros in this byte not being transmitted. t o simply transmit a field delimiter without any data symbols, this byte should be loaded with 00 hex, and transmitted with leading zero suppression. the only exception to this is when transmitting the preamble field, in which case the contents of the ph_tx_buffer have no effect on the preamble which is transmitted. ph_request_reg the ph_request_reg is initialized with 00 hex following a hardware reset. the ph_request_reg is read and interpreted by the plses each time it is written to. this value is maintained until it is next written to by the pl-one firmware. the various state transitions that can be brought about by writing to ph_request_reg are listed in table 8 .
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 13 of 56 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ph_request_reg 0 stamp 0 tx_del 0 0 tx_del 1 0 reserved 0 izs 0 stop_rx 0 hw_reset 0 tx table 5 value to write to ph_request_reg sfr to stop transmission and return to idle state bits in ph_request_reg bit description tx (msb) transmission . in idle state, it forces the plses to enter the xmit state. in xmit state, it should always be high. in rcv state, it should always be low. hw_reset hardware reset. in all states, this bit forces the whole physical layer (phyl ) to perform a hardware reset and return to the init state. stop_rx stop reception . in the init state, it is set when passing initialization parameters to the plse. in the rcv state, it forces the plses to stop reception and enter the idle state. lzs leading zero suppression . in the init state, it is set when passing initialization parameters to the plse. in the xmit state, it fo rces the plses to suppress the leading zeros in the ph_tx_buffer. when transitioning from the idle to the xmit_pre_sym state, it forces the plses to suppress the preamble symbols; in this case, only the peof is transmitted (e.g. for transmitting an iack or ir etry packets). reserved reserved tx_del 1 tx_del 0 transmission delimiters . this pair of bits is used to select the type of delimiter to transmit after the byte contained in ph_tx_buffer. the mapping between these bits and the possible delimiters is shown in table 4 . stamp (lsb) stamp. at the end of the rcv or xmit states, this flag indicates to the plses that the pl-one firmware needs one more significant timestamp byte (to a maximum of four total) recorded when the last crc symbol was received or transmitted. table 6 explanation of b its in the ph_request_reg sfr state transition tables for ph_confirm_reg and ph_request_reg the following two tables ( table 7 and table 8 ) show the state transitions associated with the plses handshake interrupts (reads of ph_confirm_reg), and writes to ph_request_reg. current state next state ph_confirm _reg transition idle rcv_pre_sym 1000 0000 detection of first superior and stop_rx bit not active. xmit_pre_sym xmit_pre_sym 0001 0000 after command to start transmission. idle idle 0000 0000 ch_quiet indication every ust.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 14 of 56 current state next state ph_confirm _reg transition rcv_pre_sym rcv_pre_sym 1000 0000 detection of inferior or superior state and 1) if current state is inferior , the number of consecutive inferior s is < 5, or 2) if current state is superior , it is of the same phase as the first superior . rcv_pre_sym idle 0100 0000 detection of 5 consecutive inferior s. rcv_pre_sym rcv_sym 1011 0110 detection of opposite phase superior after previously detecting 7 or 8 consecutive superior s. rcv_pre_sym rcv_sym 1111 0110 detection of opposite phase superior after previously detecting between 3 and 6 (inclusive) consecutive superior s. rcv_pre_sym rcv_pre_sym xxxx xxx1 jabber error. rcv_sym rcv_crc 1011 0100 detection of eop and valid data in ph_rx_buffer. rcv_sym rcv_crc 1010 0100 detection of eop and no data in ph_rx_buffer. rcv_sym rcv_sym 1011 0000 detection of data and 8 valid data bits in ph_rx_buffer. rcv_sym rcv_sym 1011 0010 detection of eof and valid data in ph_rx_buffer. rcv_sym rcv_sym 1010 0010 detection of eof and no data in ph_rx_buffer. rcv_sym rcv_sym 0110 0000 detection of inferior , as a result of carrier loss. rcv_sym rcv_sym xxxx xxx1 jabber error. rcv_crc rcv_stamp 1011 x100 received 16 crc bits to report crc status. rcv_crc rcv_crc 0110 0000 detection of inferior prior to all 16 crc bits, as a result of carrier loss. rcv_crc rcv_crc xxxx xxx1 jabber error. rcv_stamp rcv_stamp 1011 0100 after each time stamp byte is uploaded. xmit_pre_sym rcv_pre_sym 1010 0000 collision detected. xmit_pre_sym xmit_sym 0001 0000 transmission of preamble completed. xmit_pre_sym xmit_pre_sym xxxx xxx1 jabber error. xmit_sym xmit_sym 0001 0000 buffer empty. xmit_sym xmit_crc start transmission of crc. no interrupt is generated. xmit_sym xmit_sym xxxx xxx1 jabber error. xmit_crc xmit_stamp 0001 0000 transmission of crc completed. xmit_crc xmit_crc xxxx xxx1 jabber error. xmit_stamp xmit_stamp 0001 0000 after each time stamp byte is uploaded. table 7 state transitions associated with plses handshake interrupts
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 15 of 56 current state ph_request _reg next state transition idle 101x 0110 xmit_pre_sym command to start transmission. rcv_pre_sym x01x xxxx idle abort reception. rcv_sym x01x xxxx idle abort reception. rcv_crc x01x xxxx idle abort reception. rcv_stamp x01x xxxx idle abort reception. rcv_stamp 0000 0001 rcv_stamp this indicates that the macs needs one more timestamp byte. xmit_pre_sym 101x 0xx0 xmit_ sym bits 4, 2, and 1 indicate leading zero suppression and field delimiter. xmit_pre_sym 00xx xxxx idle abort transmission, xmit_sym 101x 0xx0 xmit_sym bits 4, 2, and 1 indicate leading zero suppression and field delimiter. xmit_sym 00xx xxxx idle abort transmission. xmit_crc 00xx xxxx idle abort transmission. xmit_stamp 0000 0000 idle complete transmission, does not require any more timestamp bytes. xmit_stamp 1010 0001 xmit_stamp this indicates that the macs needs one more timestamp byte. table 8 state transitions associated with writes to ph_request_reg time s tamp timer the plses supports a free-running 32 - bit timer that is used to associate a timestamp to any received or transmitted packets. the resolution of this t ime s tamp timer is 279 nsec (four oscillator cycles at 14.32 mhz, six cycles at 21.48 mhz.) for a received packet, the timestamp is acquired when the last crc symbol has been completely received. for a transmitted packet, the timestamp is acquired when the crc symbol has been completely transmitted. the least significant time stamp byte is transferred first, via ph_rx_buffer, at the same time as the end of transmission or reception is indicated. up to three additional timestamp bytes can be requested from the plses by writing 01 hex to the ph_request_reg. these bytes are transferred with the least significant byte first .
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 16 of 56 plses - pl-one firmware interface state diagram figure 3 state transition diagram for plses note: setting the ph_request_reg hw_reset bit will result in a transition to the init state from any other state or sub-state. this is not indicated on this diagram in order to simplify it. init idle rcr_pre_ sym rcv_sym rcv_ crc xmit_ stamp xmit_ crc xmit_ pre_ sym xmit_s ym rcv_ stamp
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 17 of 56 plses state transition table state description init state the ses block goes into init state only after a hardware reset, or after the pl-one firmware sets the ph_request_reg hw_reset bit . two steps are required for the pl-one firmware to fully initialize the plses and get it to the idle state. 1. the plse registers must be initialized by writing the following sequence of bytes: write dc hex to ph_tx_buffer write 30 hex to ph_request_reg write dc hex to ph_tx_buffer write 30 hex to ph_request_reg write 14 hex to ph_tx_buffer write 30 hex to ph_request_reg write 20 hex to ph_request_reg write 00 hex to ph_request_reg 2. second, an initial preamble value must be written to ph_tx_buffer, which is used as-is for the first transmitted packet. it is also used as a seed for the generation of pseudo-random preamble values for subsequent transmitted frames. after these two steps, the ses finishes its initialization routine and goes into the idle state. idle state in this state the ses has been initialized, is not transmitting a frame, and the channel is quiet. for each unit symbol time (ust) that passes, the ses block will send a plses handshake interrupt to the pl-one firmware , indicating that there is no activity on the channel. transition the ses block will go from idle to xmit_pre_sym when the command to transmit a peof is written to ph_request_reg (101x 0110 bin). transition the ses block will go from idle to rcv_pre_sym when a superior state has been detected on the channel.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 18 of 56 state description rcv_pre_sym state the plse sublayer is in the process of receiving preamble symbols, which are encoded using preamble usts that are 114 microseconds in length. this state counts the number of usts in consecutive inferior or superior states to decode each symbol. at each received medium state transition (a superior when last_rcv is inferior or an inferior when last_rcv is superior), the symbol is decoded as ?1? or ?0? according to how many usts elapsed between state transitions. the state also waits for the preamble eof (peof), which is 8 normal usts in length (100 m s each.) in the case where there are no preamble symbols, e.g. an iack frame, the rcv_pre_sym state will only process and report the peof, and the ph_confirm_reg bf/be bit will not be set. transition the ses block will go from rcv_pre_sym to rcv_sym after it receives 3 or more superior 1s with 100 - microsecond (1 ust) spacing, and the medium state changes from superior 1 to superior 2. transition the ses block will go back to idle if it detects that the received superior state was noise (a superior state followed by five inferior states), or if the ph_request _reg stop_rx bit is set rcv_sym state the plse sublayer is in the process of receiving symbols within the body of the frame. at each received medium state transition (superior 1 to superior 2, or vice versa), the symbol is decoded according to the elapsed time since the previous transition. the symbol is stored in an 8-bit shift register in the ses block. when the shift register is full, or an eof (end of field) or eop (end of packet) symbol is received, the ses block will copy the data in the shift register to ph_rx_buffer, and send a plses handshake interrupt to the pl-one firmware. transition the ses will go to rcv_crc after it receives an eop symbol. transition the ses will go to idle when the carrier is lost or when the ph_request _reg stop_rx bit is set . the carrier lost condition is explained in a later section. rcv_crc state the plse sublayer is in the process of receiving crc symbols. a bit is shifted into the 16-bit crc register for crc computation every ust. a received superior 1 shift s in a 1, and a received superior 2 shifts in a 0. after 16 usts, the ph_confirm _reg gd_packet bit is set according to whether or not the frame has kept its integrity during reception, and the ses will send a plses handshake interrupt to the pl-one firmware.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 19 of 56 state description transition the ses will also start providing the timestamp to pl-one firmware after the crc computation, and go to rcv_stamp. transition the ses will go back to idle when the carrier is lost or when the ph_request _reg stop_rx bit is set. rcv_stamp state the plse s ublayer is in the process of providing the timestamp to the pl- one firmware. the time stamp is the time associated with the end of the packet crc reception. the time stamp will be provided on four bytes (lsb first followed by more significant bytes) via the ph_rx_buffer , where each byte will be sent to the pl-one firmware via a plses handshake interrupt in ph_rx_buffer, and the ph_confirm _reg be/bf bit will be set. transition the ses will go back to idle when the ph_request _reg stamp bit (bit 0) is cleared, and the stop_rx bit is set. xmit_pre_sym state the plse sublayer is in the process of transmitting p reamble symbols. decision if it is transmitting a long preamble field ( the ph_request _reg lzs bit is 0), the ses will first transmit an 8-bit preamble value. the pl-one firmware loads the initial preamble value when the ses is in the init state. later it is computed inside the ses through a pseudo-random process . the first symbol transmitted following a quiet channel is always encoded in superior state , the next symbol will be encoded in inferior state, the third symbol will be encoded as the same superior state as the first symbol, etc. at the completion of transmitting 8-bit preamble value, the ses will also transmit the peof (the same superior state for 8 usts) before going to the xmit_sym state. if it is transmitting a short preamble field (the ph_request_reg lzs bit is 1), the ses will not transmit an 8-bit preamble value, instead it will transmit the 8 ust peof directly. but the ses still continues the process for computing the pseudo -random p reamble byte for later use. the superior state used by xmit_pre_sym state alternates between superior 1 and superior 2 for consecutive packets. the first packet transmitted will start with a superior 1 state, the second packet transmitted will start with a superior 2 state, the third one will be a superior 1 and so on. decision if it is transmitting a short preamble field (the ph_request _reg lzs bit is 1), no preamble symbols are transmitted before the 8 superior usts for the peof symbol. action before and during the process of transmitting inferior preamble symbols, the ses checks whether or not the channel is active . if activity is detected on the channel , the ses will send an interrupt to the pl-one firmware indicating a collision and at the same time stop transmission and go to rcv_pre_sym. transition the ses will go to xmit_sym state after it sends p reamble eof symbol.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 20 of 56 state description transition the ses will go back to idle if the ph_request _reg tx bit is cleared. xmit_sym state the plse s ublayer is in the process of transmitting symbols. the symbols are received from the pl-one firmware, one byte at a time through ph_tx_buffer. starting from lsb, the symbols are encoded as transitions between the superior 1 and superior 2 states. when the requested medium state lasts 1 ust, a ?1? will be shifted into the crc computation register . w hen the requested medium state lasts 2 usts, a ?0? will be shifted into the crc computation register. if the ph_request _reg lzs bit was set, then none of the leading zeros in ph_tx_buffer will be transmitted. the ph_request _reg tx_del 1 and tx_del 0 bits are used to select what type of delimiter (none, eof, or eop) will be appended to the end of the byte transmission. the peof delimiter is not available in this state. an interrupt is sent to the pl-one firmware as soon as the information in ph_request _reg and ph_tx_buffer has been copied to the ses ? internal one-byte transmission buffers. transition when the ses has finished transmitting an eop symbol, it will go to xmit_crc. transition the ses will stop transmitting and go back to idle if the ph_request _reg tx bit is cleared. xmit_crc state the plse sublayer is in the process of transmitting 16 crc symbols. the symbols are generated by the crc polynomial from the preceding ust values. a crc bit value of 1 corresponds to the same superior state that was used to transmit the peof, while a bit value of 0 corresponds to the alternative superior symbol. crc bits are transmitted most significant bit first. for example, if the first symbol transmitted is superior 2 (ie. the peof was encoded using superior 2s), then a 1 in the crc buffer = superior 2 and 0 = superior 1. action once the crc has been completely transmitted, the ses will send an interrupt to the pl-one firmware. it will also start providing the timestamp to the pl-one firmware, and go to xmit_stamp. transition the ses will stop transmitting and go back to idle if the ph_request _reg tx bit is cleared. xmit_stamp state the plses is in the process of providing the timestamp to pl-one firmware. the timestamp is the time associated with the end of the crc transmission. the timestamp will be provided on four bytes (lsb first followed by more significant bytes), where each byte will be sent to pl-one firmware via interrupt in ph_rx_buffer, and the ph_confirm _reg be/bf bit will be set. the timestamp is based on a free running counter , which is incremented by the plses system clock ( i.e. once every 279ns ) . transition the ses will go back to idle when ph_request_reg = 0.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 21 of 56 table 9 ses state transition table
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 22 of 56 flowcharts for i nterfacing to the plses if you wish to program the pl-one yourself, you will find the following flowcharts useful . they document four possible states that the plses (and pl-one firmware) can be found in, and show what the expected response is to each of the plses handshake interrupts. high- l evel flowchart figure 4 is a high-level flow chart that depicts the operation of the plses portion of the pl-one. four main states exist within the plses: initialization (init), idle (idle), reception (rcv), and transmission (xmit). all of these four states are explained in figure 5 through figure 8 . init idle rcv xmit want to transmit ch_active bit is set end of transmission end of reception collision hw_reset bit is set hw_reset bit is set initialization sequence complete, or hw_reset bit is set plses state machine figure 4 high- l evel flowchart of plses state machine
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 23 of 56 initialization (init) this is the state that the ceway pl-one powers up in, and the state that the plses reverts to whenever the hw_reset bit is set. no reception or transmission can be done until the initialization sequence is completed, and the plses enters the idle state. cold_start_init set bits px0, it0, ex0, and ea to configure and enable the plses handshake interrupt plses initialization sequence write dc hex to ph_tx_buffer write 30 hex to ph_request_reg write dc hex to ph_tx_buffer write 30 hex to ph_request_reg write 14 hex to ph_tx_buffer write 30 hex to ph_request_reg write 20 hex to ph_request_reg write 00 hex to ph_request_reg pseudo-random preamble generator initialization write initialization value for preamble field to ph_tx_buffer received a plses handshake interrupt within 1 ust? yes initialization failure verify that interrupts are properly configured and enabled, then try again. no init proceed to idle state from idle, xmit, rcv or power-up figure 5 intialization flowchart
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 24 of 56 idle (idle) this is the default state for the plses once it has been initialized. when no transmission or reception is occuring, the plses is in the idle state. if a plses handshake interrupt is received with the ch_active bit set, then the plses has transitioned to the rcv state. otherwise a transmission request may be made to the plses. idle wait for plses handshake interrupt is ch_active bit set? want to transmit? no no yes yes idle from init, xmit, or rcv proceed to rcv state proceed to xmit state figure 6 idle flowchart
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 25 of 56 reception (rcv) this is the state that the plses enters into when it detects a cebus-like signal on the channel. explanations of the various actions and decisions found in the flowchart are listed below: wait for plses handshake interrupt : wait for the plses to generate its interrupt (int0*). note that in order for the plses to consider that the interrupt has been processed and be able to send another interrupt , you need to read the ph_confirm_reg (see plses handshake interrupt generation on page 12 ). peof received? : if the ph_confirm_reg is 1x1x 0110 bin, this indicates that you have just received the peof. if the ch_noisy bit is set, it means that the medium was noisy and that only between 3 to 6 peof symbols were detected. if it is not set , it means that the medium was not noisy. if the be/bf bit (buffer full) is set, it means that the received preamble symbols are stored in the ph_rx_buffer. if it is not set, it means that there were no received preamble symbols (probably an acknowledgement packet or an immediate retry packet). in this case, the ph_rx_buffer value is irrelevant. if you did not get a peof delimiter in the ph_confirm_reg, it means that you are still receiving the preamble symbols, or have detected a symbol_noise condition. rcv_jabber_detect detected? : if the jabber bit (jabber detected) is set, and the plses is in the rcv state, this indicates that the plses has received 1000 consecutive superior symbols. process rcv_jabber_detect : you need to force the plses back to the idle state by setting the stop_rx bit. symbol_noise detected? : if the ch_noisy bit (channel noisy) is set, this means that it was noise on the channel that caused the plses to transition to the rcv_pre_sym state. otherwise, you are still receiving the preamble and/or peof. process symbol_noise : the plses automatically transitions from rcv_pre_sym to idle when a symbol_noise condition occurs, and the pl-one firmware should do the same. carrier_lost detected? : if the ch_noisy bit is set in any plses handshake interrupt past the reception of the peof, it means that a carrier_lost condition has occur r ed. this is when an inferior state is detected on the channel after receiving a peof , but before receiving the last crc symbol. process carrier_lost? : a carrier_lost condition was detected so the received part of the packet is not complete. unlike the symbol_noise condition, the plses does not automatically transition back to the idle state when a carrier_lost condition occurs. the pl-one firmware needs to update its macs state variables to deal with the carrier_lost condition, and then proceed to the reset rcv state. reset rcv state : set the stop_rx bit (stop reception), which forces the plses back to the idle state. next byte received? : if the be/bf bit (buffer full) is set, it means that the plses received a data byte and it is in the ph_rx_buffer. if it is not set, it means that all that was received was a delimiter. note that it is possible to receive both a data byte and a delimiter in the same interrupt. read data byte? : read one data byte from ph_rx_buffer.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 26 of 56 read delimiter : read the delimiter from the ph_confirm_reg _ two delx bits (delimiter). the two delx bits can be set to 00 bin , which indicates no delimiter, to 01 bin , which indicates an eof, or to 10 bin , which indicates an eop. eop received? : if your last received data byte was accompanied by the eop delimiter, then the plses will now expect a crc. if the plses has not received the last data byte (eop), it will simply continue receiving extra data bytes. read crc status : read the crc status from the gd_packet bit (good packet). once the plses has finished receiving the crc it verifies it against an internally generated one. if the crcs match, then the plses sets the gd_packet bit.. otherwise the gd_packet bit is not set, indicating that some packet symbols were either missed or misinterpreted, and that the packet should be discarded. do you want any rcv_time s tamp bytes? : you might choose to retrieve the timestamp associated with the reception of your packet?s last crc symbol. it is a 32-bit value with 279 nsec (four or six clock cycles, depending on selclk.) it will be passed as four separate bytes in ph_rx_buffer, in the lsbyte first order. read rcv_time s tamp byte : read one timestamp byte from ph_rx_buffer. do you want another rcv_time s tamp byte? : you might choose to retrieve only a partial timestamp, perhaps deducing the values of the most significant bytes. anywhere between zero and four timestamp bytes may be retrieved. request next rcv_time s tamp byte : write 0 1 hex to ph_request_reg.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 27 of 56 rcv_pre_sym wait for plses handshake interrupt. peof received ? rcv_jabber_detect detected ? symbol_noise detected ? process rcv_jabber_detect rcv_sym wait for plses handshake interrupt. carrier_lost detected ? process carrier_lost rcv_jabber_detect detected ? data byte received ? read data byte read delimiter eop received ? rcv_crc wait for plses handshake interrupt. carrier_lost detected ? process carrier_lost rcv_jabber_detect detected ? rcv_stamp read crc status read rcv_timestamp byte. request next rcv_timestamp byte rcv from idle or xmit state return to idle state return to idle state return to idle state do you want any rcv_timestamp bytes ? reset rcv_state yes no no no yes no no no yes yes no yes no yes no yes yes yes yes no yes no do you want another rcv_timestamp byte? process symbol_noise wait for plses handshake interrupt reset rcv_state reset rcv_state figure 7 reception flowchart
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 28 of 56 transmission (xmit) this is the state that the plses enters into when the pl-one firmware writes the tranmission command to the ph_request_reg. an explanation of the various actions and decisions in the flowchart is listed below: transmit preamble field : in order to transmit, you need to write 101x 0110 bin to ph_request_reg. if you want to transmit a full preamble field (8 preamble symbols and a preamble end-of-field (peof) delimi ter), you need to clear the lzs bit (leading zero suppression). if you want to only transmit a peof, without a preamble field, (for acknowledgement packets or for immediate retry (iretry) packets), you need to set the lzs bit. wait for plses handshake interrupt : wait for the plses to generate its interrupt (int0*). note that in order for the plses to consider that the interrupt has been processed and be able to send another interrupt, you need to read the ph_confirm_reg (see plses handshake interrupt generation on page 12 ). preamble field accepted? : if the ph_confirm_reg be/bf bit (buffer empty) is set, it means that the plses has stored the pseudo-randomly generated preamble in its buffer and is in the process of transmitting it. if this bit is not set, it means that a collision was detected. collision detected? : if the ph_confirm_reg col/rx bit (collision) is set, it means that the plses has detected a collision while transmitting an inferior preamble symbol. if this bit is not set, it means that activity was detected on the channel just prior to starting the transmission. process pre-transmission collision : an active channel was detected just before the ?transmit preamble field? was performed, the plses switched into the rcv_pre_sym state, and sent an interrupt to the pl-one firmware. for whatever reason , the firmware did not or could not immediately process the interrupt and continued the ?transmit preamble field? procedure by writing 101x 0110 bin to ph_request_reg. since the stop_rx bit (10 1 x 0110 bin) was set, this command forces the plses back to the idle state. the firmware should recognize this transition just like a normal collision. process collision : the plses has already transitioned from the xmit to the rcv state and the pl- one firmware should do the same. transmit control field & eof : write the control field to the ph_tx_buffer and 1011 0010 bin to ph_request_reg. note that even though you set the lzs bit, leading zero suppression will only be performed if there are some leading zeros to suppress. if the top bit of the control field, the sequence number, is set (1), then this byte is transmitted exactly as if the lzs bit had not been set. control field accepted? : if the ph_confirm_reg be/bf bit (buffer empty) is set, it means that the plses has accepted and stored your control field in its buffer, is in the process of transmitting it (it has just finished transmitting the peof) and is ready for another byte. if the be/bf bit is not set, this means that a collision was detected and the col/rx bit (collision) will be set. transmit next byte : write the next byte to ph_tx_buffer. then write the appropriate transmission options to ph_request_reg. the base configuration for ph_request_reg is 101x 0xx0 bin. setting the lzs bit will result in the leading zeros in the byte in ph_tx_buffer not being transmitted. the two delx bits (delimiter) can be set to 00 bin to select no delimiter, 01 bin to select an eof or 10 bin to select an eop. it is not possible to transmit a peof delimiter from this state ; this delimiter can only be used to begin a transmission.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 29 of 56 xmit_jabber_detect detected? : if the ph_confirm_reg jabber bit (jabber detected) is set and that the plses is in the xmit state, this indicates that the plses has transmitted 1000 consecutive superior symbols. process xmit_jabber_detect : you must reset the plses, via the ph_request_reg hw_reset bit (hardware reset). you must then wait for at least 10 000 usts before attempting another transmission to conform to the cebus standard. eop requested? : if your last requested ?next byte? to transmit was accompanied by the end-of_packet (eop) delimiter (last byte to transmit), then, once the plses is done transmitting the eop, it will generate and start transmitting the crc. if you did not request an eop delimiter, you need to continue sending other bytes to the plses. transmit crc : write 00 hex in the ph_tx_buffer and 1011 0100 bin in the ph_request_reg. note that even though this request includes an eop delimiter, the plses will not transmit a second eop. it will simply generate and transmit the 16 - bit crc. do you want any xmit_time_stamp bytes? : you might choose to retrieve the timestamp associated with the transmission of your packet?s last crc symbol. it is a 32-bit value with 279 nsec (four or six clock cycles, depending on selclk.) it will be passed as four separate bytes in ph_rx_buffer, in the lsbyte first order. read xmit_time_stamp byte : read one timestamp byte from ph_rx_buffer. do you want another xmit_time_stamp byte? : you might choose to retrieve only a partial timestamp, perhaps deducing the values of the most significant bytes. anywhere between zero and four timestamp bytes may be retrieved. request next xmit_time_stamp byte : write a1 hex to ph_request_reg. reset xmit state : write 00 hex in the ph_request_reg.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 30 of 56 xmit_pre_sym transmit control field & eof xmit start transmission transmit preamble field wait for plses interrupt preamble field accepted ? wait for plses interrupt control field accepted ? xmit_sym transmit next byte. eop requested ? wait for plses interrupt xmit_jabber_detect detected ? wait for plses interrupt xmit_jabber_detect detected ? xmit_crc wait for plses interrupt xmit_jabber_detect detected ? do you want any xmit_timestamp bytes ? xmit_stamp read xmit_timestamp byte. do you want another xmit_timestamp byte ? reset xmit state request next xmit_timestamp byte. from idle proceed to idle state proceed to rcv state wait for plses interrupt yes no yes no no no no yes yes process xmit_jabber_detect yes yes no yes process collision collision detected ? no yes process pre- transmission collision proceed to idle state no transmit crc yes figure 8 transmission flowchart
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 31 of 56 timing constraints it is important to note that the plses sends an interrupt to the pl-one firmware every ust (100 m s) when there isn?t any activity on the channel. this interrupt is required if the firmware is to accurately implement the timing constraints specified within the eia documents on the dll and macs (eia 600.41, 600.42). however it places some severe restrictions on the design of the interrupt service routine. this routine should never last more than 100 m s when in the idle state, as an interrupt will then be missed. if possible, it should be considerably shorter than this, so as to allow as much processing time for other processes when the channel is quiet. transmission timing constraints the plses uses a one-byte transmission buffer (in addition to ph_tx_buffer) to store the byte that is currently being transmitted. this gives the pl-one firmware some breathing room, as it has between 3 and 26 usts to write the next byte to the ph_tx_buffer before an underrun condition will occur. for example, when starting transmission, the byte 101x 0000 bin is written to ph_request_reg. as soon as the plses starts transmitting the preamble (or peof, if the lzs bit was set), it returns a plses handshake interrupt with the ph_confirm_reg set to 10 hex. the pl-one firmware then has up to the end of the transmission of the peof to respond to this interrupt before an underrun condition will occur. the worst-case scenario in the cebus standard is when a 00 hex byte is transmitted with leading zero suppression, and an eof delimiter. since an eof takes 3 usts to transmit, the pl-one firmware has 300 m s to send another byte down to the plses before an underrun condition will occur. reception timing constraints the reception timing constraints are similar to the constraints in transmission. the pl-one firmware must ensure that it completes all plses handshake interrupts with in 3 usts to avoid the possibility of an overrun condition (ex: two eof symbols immediately after each other, which will occur for any packets sent to the broadcast address.) a much tighter constraint, however, is the cebus standard requirement that iack, failure, and adr_iack packets be transmitted within 2 usts of ack_data or adr_ack_data packets addressed to your local address. it is recommended that the appropriate packet be assembled as soon as it is detected that an acknowledged packet is addressed to you, and that the transmission of this packet should be started in the rcv_stamp plses handshake interrupt. this interrupt indicates that the crc has been received and that the least significant timestamp byte is available in ph_rx_buffer.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 32 of 56 example t he next page g i ve s an example of an actual packet transmission. the six different values that are visible in figure 4 are the following: cfm_en: this signal is pulsed every time the pl-one firmware reads the ph_confirm_reg. this is roughly the same as when the pl-one firmware receives a plses handshake interrupt from the plses (there is a small delay between receiving the interrupt and reading the ph_confirm_reg.) req_en: this signal is pulsed every time the pl-one firmware writes to the ph_request_reg. this sends an interrupt to the plses, which then processes the value written into ph_request_reg. ph_cfm: this is the value in the ph_confirm_reg. ph_tx: this is the value in the ph_tx_buffer. ph_req: this is the value in the ph_request_reg. m_st: this is the current medium state requested by the plses. this can take one of three values: 0 for inferior , 1 for superior phase 1, and 2 for superior phase 2. note: the following explanation will mention several macs state variables. if you are not familiar with these variables, their definitions can be found in eia 600.42. you?ll notice that prior to beginning transmission there is a cfm_en pulse every ust. this is the plses handshake interrupt indicat ing that the channel is quiet, and should be used to increment the various macs transmission counters that are denominated in usts. once the quiet counter is greater or equal to wait_time, the pl-one firmware attempts a tran s m ission by writing a6 hex to ph_request_reg. this requests a packet tran s mission including a full preamble (since the lzs bit was not set.) the plses receives the request, waits until an integral number of usts have passed since the last time either 00 hex or 20 hex was written to ph_request_reg , and then begins transmission. as soon as transmission begins, the pl-one firmware receive s a plses handshake interrupt indicating that the plses is ready for the next byte to transmit (ph_confirm_reg = 10 hex). the pl-one firmware has right up until the end of the transmission of the peof to respond to this interrupt by writing the control field to ph_tx_buffer, and b2 hex to ph_request_reg. in this example a value of 0d hex is written to ph_tx_buffer, indicating that this is to be an adr_ack_data packet. no collision occurs in this example, as at the end of the tranmission of the peof , the mdps starts transmitting the control field with leading zero suppression (as requested), and the pl-one firmware receives a plses handshake interrupt indicating that the transmission buffer is ready for another byte. this process continues through the da, dhc, sa, shc, and data fields, right up until a request is made to transmit the last data byte (09 hex) followed by an eop symbol (a4 hex to ph_request_reg). since this transmission information is stored in a one-byte buffer, another plses handshake interrupt is returned when transmission of this final data byte begins. the pl-one firmware does not need to write to ph_tx_buffer for this interrupt, but does need to write a0 hex to ph_request_reg to keep the transmission going. once the eop has been transmitted, it is followed by a 16 - bit crc. no plses handshake interrupt is returned for this state transition. when the transmission of the crc is finished , a final plses handshake interrupt is returned, after which the pl-one firmware must write 00 hex to ph_request_reg to return the plses to its idle state. interrupts will then be received every ust indicating that the channel is quiet, or has become active.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 33 of 56 figure 9 example of a packet tranmission cfm_en req_en ph_cfm ph_tx ph_req m_st cfm_en req_en ph_cfm ph_tx ph_req m_st cfm_en req_en ph_cfm ph_tx ph_req m_st scale: top figure: 10 usts / division middle figure: 3 usts / division bottom figure: 1 ust / division
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 34 of 56 general definitions packet s ymbols preamble symbol zero: 2.28 usts ( superior s , phase 1, or inferior ) preamble symbol one: 1.14 usts ( superior s , phase 1, or inferior ) data symbol zero: 2 usts ( superior s , phase 1 or phase 2) data symbol one: 1 usts ( superior , phase 1 or phase 2) crc symbol zero: 1 usts ( superior , phase 2) crc symbol one: 1 usts ( superior , phase 1) packet d elimiters : preamble eof (peof): 8 usts ( superior s, phase 1) end of field (eof): 3 usts ( superior s , phase 1 or phase 2) end of packet (eop): 4 usts ( superior s , phase 1 or phase 2) ref : eia 600.31, section 5.1.1 packet f ields preamble field, control field, destination address (da) field, destination house code (dhc) field, source address (sa) field, source house code (shc) field, information field and a crc. these are the various fields contained in a packet. note that not all these fields need to be present to form a packet. for example, adr_iack packets do not contain the sa or shc fields ; iack and failure packets do not contain the da, dhc, sa or shc fields. ref : eia 600.42, section 2.2.2, 2.2.4 and 2.2.6. packet f ield p arts preamble field, control field, da low byte, da high byte, dhc low byte, dhc high byte, sa low byte, sa high byte, shc low byte, shc high byte, all information bytes and the crc indication. note that th e term packet field parts is used to represent the various parts of a packet, exchanged between the pl-one firmware and plses. this is not necessarily a complete packet field since one-byte buffers are used ( ph_rx buffer or ph_tx buffer ) when exchanging a packet ; as well , most fields are longer than one byte in length. symbol noise when a noise on the medium has been perceived as a packet symbol. this can be generated either by preamble symbols having been partly received due to a transmitted partitioned packet , preamble symbols being received where a sudden noise buries the rest of the packet , or when a real noise is being interpreted as a packet symbol.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 35 of 56 m8052 8- b it microcontroller the m8052 is a high performance 8-bit microcontroller. it is software - compatible (including instruction execution times) with the industry standard 8052ah and 8752bh discrete devices. it can address internal data memory of up to 256 bytes. the m8052 can also address 64 kbytes of external data ram, and 64 kbytes of external program rom via the i/o ports. three 16-bit timer/counters are provided as well as a full-duplex serial port (uart). the m8052 has 31 external port pins. the m8052 has a power saving mode called idle mode. in idle mode, the clock to the cpu is stopped but the timer/counters and serial port are still active. memory map memory connection the m8052 has separate program and data memory. both internal and external data memory can be accessed, while only external program memory can be accessed. external memory accesses use port 0 as a multiplexed address and data bus and port 2 for the high order address lines. ale is used to latch the lower - order address which appears on port 0. psen * is the program memory read strobe, rd* is the data memory read strobe and wr* is the data memory write strobe. program memory up to 64 kbytes of external program memory can be accessed directly. more can be accessed if a bank- switching scheme is implemented. data memory internal data memory internal data memory for the m8052 is 256 bytes. the whole internal data memory is accessible using indirect addressing, but only the lower 128 bytes are accessible using direct addressing. the upper 128 bytes of direct address data memory space are used to access sfrs (see below). register banks there are four directly addressable register banks switched between using the psw ( see below), which occupy data memory space from 00 hex to 1f hex.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 36 of 56 bit addressing 16 bytes of data memory (addresses 20 hex to 2f hex) are bit addressable. sfrs that have addresses of 1xxx x000 bin are bit addressable. scratch pad direct addresses from 3f hex to 7f hex are usable as scratch pad registers or for a stack. external data memory external data memory may be either 8 - bit or 16 - bit addressable. registers r0 and r1 are used for indirect 8-bit addressing, the dptr register is used for 16-bit addressing. special function registers all i/o, timer/counter and uart operations for the m8052 are accessed via special function registers (sfrs). these registers occupy direct data memory space locations in the range 80 hex to ff hex. in the same area various control and program registers may be accessed. their names and addresses are given in table 10 below, and their definitions follow. sfr map description abbreviation address bit addressable port 0 p0 80 stack pointer sp 81 data pointer low byte dpl 82 data pointer high byte dph 83 receive buffer from plses ph_rx_buf 84* transmit buffer to plses ph_tx_buf 85* power control register pcon 87 timer/counter c ontrol tcon 88 timer/counter mode c ontrol tmod 89 timer/counter 0 low byte tl0 8a timer/counter 1 low byte tl1 8b timer/counter 0 high byte th0 8c timer/counter 1 high byte th1 8d port 1 p1 90 serial control r egister scon 98 serial data buffer sbuf 99 port 2 p2 a0 interrupt enable r egister ie a8 port 3 p3 b0 interrupt priority r egister ip b8 timer/counter 2 control t2con c8 capture register 2 low byte rcap2l ca capture register 2 high byte rcap2h cb
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 37 of 56 timer/counter 2 low byte tl2 cc timer/counter 2 high byte th2 cd program status word psw d0 confirm port from plses ph_confirm _ reg d8* accumulator a e0 request port to plses ph_request _ reg e8* b r egister b f0 table 10 m8052 sfr map note that the register s marked * are not present in the original device. sfr definitions i/o ports (p0 p1 p2 p3) p0, p1, p2, p3.0 and p3.1 are latches used to drive the 26 quasi-bidirectional i/o lines. on reset they are all set to the ff hex value , which is input mode. p3.3 and p3.5 are always in input mode ; writing these bits has no effect on the external port or on the next value read from these bits. p3.4, p3.6 and p3.7 are always in output mode . e xternal voltages applied to these pins can not be read from within the chip. stack pointer (sp) the sp register contains the stack pointer. the stack pointer is used to load the program counter into memory during lcall and acall instructions and is used to retrieve the program counter from memory in ret and reti instructions. temporary data may also be saved or loaded using push and pop instructions, which also increment and decrement the stack pointer. the stack pointer points to the top location of the stack. on reset the stack pointer is set to 07 hex. data pointer (dptr) the data pointer (dptr) is 16 bits in size and consists of two registers, the data pointer high byte (dph), and the data pointer low byte (dpl). two 16 - bit operations are possible on this register, they are load immediate and increment. this register is used for 16 - bit address external memory accesses, for offset code byte fetches and for offset program jumps. on reset , the value of this register is 0000 hex. power control register (pcon) bit definitions for this register are as follows: pcon.7 smod. double baud rate bit. for use see below. pcon.6 not implemented. pcon.5 not implemented. pcon.4 not implemented. pcon.3 gf1. general purpose flag bit. pcon.2 gf0. general purpose flag bit. pcon.1 not implemented. pcon.0 idl. idle bit. if 1, idle mode is entered. on reset this register returns 0xxx0000 binary.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 38 of 56 timer/counter registers three 16 - bit timer counters are provided. tcon and tmod are used to set the mode of operation and to control the running and interrupt generation of timer counters 0 and 1. t2con controls operation of timer counter 2. the timer/counter values are stored in three pairs of 8 - bit registers (tl0, th0, tl1, th1, and tl2, th2). the value stored in timer counter 2 may be "captured" into rcap2l and rcap2h. timer/counter control (tcon) bit definitions for this register are as follows: tcon.7 tf1. timer 1 overflow flag. set by hardware when timer/counter 1 overflows. cleared by hardware when processor calls the interrupt service routine. tcon.6 tr1. timer 1 run control. if 1 , timer runs . i f 0 , timer is halted. tcon.5 tf0. timer 0 overflow flag. set by hardware when timer/counter 0 overflows. cleared by hardware when processor calls the interrupt service routine. tcon.4 tr0. timer 0 run control. if 1 , timer runs . i f 0 , timer is halted. tcon.3 ie1. external interrupt 1 edge flag. set by hardware when an external interrupt 1 edge is detected. tcon.2 it1. interrupt 1 control bit. if 1, a falling edge triggers an interrupt. if 0, a low level triggers an interrupt. tcon.1 ie0. external interrupt 0 edge flag. set by hardware when an external interrupt 0 edge is detected. tcon.0 it0. interrupt 0 control bit. if 1, a falling edge triggers an interrupt. if 0, a low level triggers an interrupt. this bit must be set to 1 for correct operation of the plses interrupt. timer/counter mode (tmod) tmod.7 gate1. timer 1 gate flag. when tcon.6 is set and gate1 = 1, timer/counter 1 will only run if int1 pin is 1 (hardware control). when gate1 = 0, timer/counter 1 will only run if tcon.6 = 1 (software control). tmod.6 c/nt1. timer/counter 1 selector. if 0 input is from internal system clock, if 1 input is from t1 pin. tmod.5 m1(1). timer 1 mode control bit m1. tmod.4 m0(1). timer 1 mode control bit m0. tmod.3 gate0. timer 0 gate flag. when tcon.6 is set and gate0 = 1, timer/counter 1 will only run if int0 pin is 1 (hardware control). note that this option is not very useful, since the value of the int0 pin
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 39 of 56 (p3.2) is controlled by the plses. when gate0 = 0, timer/counter 0 will only run if tcon.6 = 1 (software control). tmod.2 c/nt0. timer/counter 0 selector. if 0, input is from internal system clock. if 1, input is from t0 pin. this bit must be set to 0 for correct operation of timer 0, as pin t0 is output only. tmod.1 m1(0). timer 0 mode control bit m1. tmod.0 m0(0). timer 0 mode control bit m0. for both timer counters the mode bits m0 and m1 apply as follows: m1 m0 operating mode 0 0 13-bit timer/counter (m8048 compatible mode). 0 1 16-bit timer/counter. 1 0 8-bit auto-reload timer/counter. 1 1 timer 0 is split into two halves. tl0 is an 8-bit timer/counter controlled by the standard timer 0 control bits. th0 is an 8-bit timer/counter controlled by the standard timer 1 control bits. th1 and tl1 are held (timer 1 is stopped). table 11 configuration m ode b its (tmod.5, tmod.4, tmod.1, tmod.0) for timers 0 and 1 timer/counter data (tl0 tl1 th0 th1) tl0 and th0 are the low and high bytes of timer/counter 0 respectively. th0 and th1 are the low and high bytes of timer counter 1 , respectively. on reset all timer/counter registers are 00 hex. timer/counter 2 control (t2con) bit definitions for this register are as follows: t2con.7 tf2. timer 2 overflow flag. set by hardware when timer/counter 2 overflows unless either rclk or tclk is set to 1. this bit is not cleared by hardware when the processor calls the interrupt service routine. t2con.6 exf2. timer 2 external flag. this bit is set when a capture or reload is triggered by a negative transition on t2ex (p1.1), and exen2 is set to 1. if timer 2 interrupt is enabled, setting this bit will cause an interrupt to the timer 2 vector. t2con.5 rclk. if this bit is set , the serial port receive clock is driven from the overflow pulses of timer 2. t2con.4 tclk. if this bit is set , the serial port transmit clock is driven from the overflow pulses of timer 2. t2con.3 exen2. timer 2 external interrupt enable flag. when set, a negative edge on t2ex (p1.1) triggers a capture or auto-reload.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 40 of 56 t2con.2 tr2. run control bit for timer 2. if set to 1, the timer is enabled. t2con.1 c/nt2. timer/counter select. a 0 selects internal timer mode. a 1 selects external counter mode. t2con.0 cp/nrl2. capture/reload control. when set , captures occur on negative transitions of t2ex (if exen2 is set). if 0 , auto-reloads are performed on timer overflows or on negative transitions of t2ex (if exen2 is set). if either rclk or tclk is 1 , this bit is ignored and auto-reloads are performed on timer overflows. timer/counter 2 data (tl2 th2 rcap2l rcap2h) tl2 and th2 are the low and high bytes of timer/counter 2 respectively. rcap2l and rcap2h are the low and high bytes of timer 2 capture registers. these registers are also used for auto-reload. th2 and tl2 cannot be reliably read from or written to while counter/timer 2 is operating as a timer in either baud-rate mode. timer 2 should be turned off using t2con before reading or writing to the counter registers in this mode. on reset all these registers return 00 hex. uart registers the uart uses two sfrs. scon is the control register, sbuf the data register. data is written to sbuf for transmission, and sbuf is read to obtain received data. the received data and transmitted data registers are completely independent. the b it definition for scon follows. uart control (scon) scon.7 sm0. uart mode specifier. scon.6 sm1. uart mode specifier. scon.5 sm2. uart mode specifier. scon.4 ren. if 1, enables reception. if 0, disables reception. scon.3 tb8. in modes 2 and 3 , this is the 9th data bit sent. scon.2 rb8. in modes 2 and 3 , this is the 9th data bit received. in mode 1, if sm2 = 0, this is the stop bit received. in mode 0 , this bit is not used. scon.1 ti. transmit interrupt flag. this is set by hardware at the end of the 8th bit in mode 0, or at the beginning of the stop bit in other modes. must be cleared by software.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 41 of 56 scon.0 ri. receive interrupt flag. this is set by hardware at the end of the 8th bit in mode 0, or at the half point of the stop bit in other modes. must be cleared by software. the mode control bits operate as follows: sm0 sm1 operating mode baud rate 0 0 mode 0: 8 - bit shift register f osc /12 0 1 mode 1: 8 - bit uart variable 1 0 mode 2: 9 - bit uart f osc /32 or f osc /64 1 1 mode 3: 9 - bit uart variable table 12 uart m ode b its (scon.7, scon.6) for s erial p ort sm2 modifies the above as follows : in modes 2 & 3, if sm2 is set , the receive interrupt will not be generated if the received 9th data bit is 0. in mode 1 , the receive interrupt will not be generated if a valid stop bit is not received. in mode 0 , sm2 should be 0. this bit enables multi-processor communication over a single serial line. uart baud rates the uart baud rates in each of the 4 modes are defined as follows: mode 0. the baud rate is fixed: baud rate = f osc / 12. modes 1 and 3. the baud rate is variable, determined by timer/counter 1 or timer/counter 2 (timer/counter 1 should be in auto-reload mode, timer/counter 2 should be in baud rate generating mode): baud rate = k f osc / 32 12 (256 - th1) mode 2. the baud rate is selectable from one of two values: baud rate = k f osc / 64 k = pcon.7 + 1. th1 is the auto-reload value for timer/counter 1. it should be noted that in modes 1 and 3 the equation is valid for all values of th1. if timer 2 is being clocked internally, then: timer 2 baud rate = fosc / 32 ( 65536 - (rcap2h.rcap2l) ) the above equation is valid for all values of rcap2 except 65535 (ffffh). if timer 2 is being clocked internally, then: timer 2 baud rate = timer 2 overflow rate / 16 the above equation is valid for all values of rcap2. uart data (sbuf) this register is used for both transmit and receive data. transmit data is written to this location and receive data is read from this location, but the two paths are independent. on reset scon returns 00 hex, sbuf returns xx hex.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 42 of 56 interrupt enable register (ie) for each bit in this register, a 1 enables the corresponding interrupt, and a 0 disables it. the allocation of interrupts to bits is as follows: ie.7 ea. enable or disable all interrupt bits ie.6 not implemented ie.5 et2. enable or disable timer 2 interrupt ie.4 es. enable or disable serial port interrupt ie.3 et1. enable or disable timer 1 overflow interrupt ie.2 ex1. enable or disable external interrupt 1 ie.1 et0. enable or disable timer 0 overflow interrupt ie.0 ex0. enable or disable plses interrupt on reset , this register returns 00000000 binary. interrupt priority register (ip) for each bit in this register, a 1 selects high priority for the corresponding interrupt, and a 0 selects low priority. the allocation of interrupts to bits is as follows: ip.7 not implemented ip.6 not implemented ip.5 pt2. select priority for timer 2 interrupt ip.4 ps. select priority for serial port interrupt ip.3 pt1. select priority for timer 1 overflow interrupt ip.2 px1. select priority for external interrupt 1 ip.1 pt0. select priority for timer 0 overflow interrupt ip.0 px0. select priority for plses interrupt. this should always be set to 1 to ensure correct data transfer between the 8052 and the plses. when an interrupt is in progress, only a higher level interrupt can interrupt the service routine. on reset , this register returns 00000000 binary. program status word (psw) this register contains status information resulting from cpu and alu operation. the bit definitions are given below: psw.7 cy. alu carry flag psw.6 ac. alu auxiliary carry flag psw.5 f0. general purpose user definable flag psw.4 rs1. register bank select bit 1 psw.3 rs0. register bank select bit 0 psw.2 ov. alu overflow flag psw.1 f1. user definable flag psw.0 p. parity flag. set each instruction cycle to indicate odd/even parity in the accumulator .
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 43 of 56 the register bank select bits operate as follows. rs1 rs0 register bank select 0 0 rb0. registers from 00 - 07 hex. 0 1 rb1. registers from 08 - 0f hex. 1 0 rb2. registers from 10 - 17 hex. 1 1 rb3. registers from 18 - 1f hex. table 13 register b ank s election b its (psw.4, psw.3) on reset , this register returns 00 hex. accumulator (acc) this register provides one of the operands for most alu operations. in the instruction table below it is denoted as "a". on reset , this register returns 00 hex. b register (b) this register provides the second operand for multiply or divide instructions. otherwise it may be used as a scratch pad register. on reset , this register returns 00 hex. interrupts the m8052 provides 6 interrupt sources. the external interrupt int1* is either level or edge triggered (depending on bits in tcon, see above). timer 0, 1 and 2 interrupts are generated by tf0, tf1 and tf2 via a rollover in their respective registers (or a negative transition on t2ex), except in mode 3 when th0 controls timer 1 interrupt. the serial interrupt is generated by a logical or of ri and ti. the timer 2 interrupt is generated by the logical or of tf2 and exf2. the ceway pl-one uses the standard int0* by the plses block, so this interrupt will not be accessible via an external pin. details on when this interrupt is generated are described in the plses section. all other characteristics of the interrupt services are described in this section. interrupt flag clear if the external interrupts are edge triggered, the interrupt flag is cleared on vectoring to the service routine, but if they are level triggered then the flag is controlled by the external signal. timer counter flags 0 and 1 are cleared on vectoring to the interrupt service routine, but the serial interrupt flag is not affected by hardware. the serial interrupt flag and timer 2 flag are not affected by hardware, they should be cleared by software. priority levels one of two priority levels may be selected for each interrupt. a high priority interrupt may interrupt the service routine of a low priority interrupt, and if two interrupts of different priority occur at the same time the higher level interrupt will be serviced first. an interrupt cannot be interrupted by another interrupt of the same priority level. if two interrupts of the same priority level occur simultaneously, a polling sequence is observed as follows:
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 44 of 56 source level description ie0 1 (highest) plses interrupt tf0 2 timer/counter interrupt 0 ie1 3 external interrupt 1 tf1 4 timer/counter interrupt 1 ri + ti 5 serial interrupt tf2 + exf2 6 (lowest) timer/counter 2 interrupts table 14 interrupt p riority l evels and d escriptions interrupt vectors when an interrupt is serviced, a long call instruction is executed to one of the following locations: source vector address ie0 0003 hex tf0 000b hex ie1 0013 hex tf1 001b hex ri + ti 0023 hex tf2 + exf2 002b hex table 15 interrupt v ector a ddresses interrupt latency the response time in a single interrupt system is between 3 and 9 machine cycles, depending on wh ich instruction was being execut ed when the interrupt occurred. this can be reduced to 7 machine cycles if the mul or div instructions are never used.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 45 of 56 instruction definitions the m8052 instruction set is shown in table 17 and some of the features supported are outlined below. addressing modes the set provides a variety of addressing modes which are outlined below. direct addressing in direct addressing , the operand is specified by an 8 - bit address field. only internal data and sfrs may be accessed using this mode. indirect addressing in indirect addressing , the operand is specified by an address contained in a register. two registers (r0 and r1) from the current bank, or the dptr may be used for addressing in this mode. both internal and external data memory may be indirectly addressed. register addressing in register addressing , the operand is specified by the top 3 bits of the opcode, which selects one of the current bank of registers. four banks of registers are available . t he current bank is selected by bits in the psw. register specific addressing some instructions only operate on specific registers, and this may be defined in the opcode. in particular , some accumulator operations and some pointer operations are defined in this manner. immediate data instructions which use immediate data are 2 bytes long or over , and the immediate operand is stored in program memory as part of the instruction. indexed addressing only program memory may be addressed using indexed addressing. it is intended for simple implementation of lookup tables. a 16 - bit base register (either the pc or the dptr) is combined with an offset stored in the accumulator to access data in program memory. arithmetic instructions the m8052 implements add, addc (add with carry), subb (subtract with borrow), inc (increment) and dec (decrement) functions, which may be used in most addressing modes. there are three accumulator specific instructions, da a (decimal adjust a), mul ab (multiply a by b) and div ab (divide a by b). logical instructions the m8052 implements anl (and logical), orl (or logical) and xrl (exclusive-or logical) functions, which again may be used in most addressing modes. there are seven accumulator specific instructions, clr a (clear a), cpl a (complement a), rl a (rotate left a), rlc a (rotate left through carry a), rr a (rotate right a), rrc a (rotate right through carry a) and swap a (swap nibbles of a).
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 46 of 56 data transfers internal memory data may be moved from the accumulator to any internal memory location, from any internal memory location to the accumulator, and from any internal memory location to any sfr or other internal memory location. external memory t he accumulator data may be moved to or from an external memory location in one of two addressing modes. in 8 -b it addressing mode , the external location is addressed by either r0 or r1 ; in 16 - bit addressing mode the location is addressed by the dptr. jump instructions unconditional jumps four kinds of unconditional jump instructions are available. short jumps (sjmp) are relative jumps (limited to -128 to +127 bytes) . long jumps (ljmp) are absolute 16 - bit jumps, and absolute jumps (ajmp) which are absolute 13 - bit jumps (i . e . within a 2k byte memory page). the last type is an indexed jump, jmp @a+dptr, which jumps to a location contained in the dptr register, offset by value stored in the accumulator. subroutine calls and returns there are only two sorts of subroutine call, acall and lcall, which are absolute and long as above. two return instructions are provided, ret and reti, the latter being for interrupt service routines. conditional jumps conditional jump instructions all use relative addressing, so are limited to the same -128 to +127 byte range as above. boolean instructions the bit addressable registers in both direct and sfr space may be manipulated using boolean instructions. there are available logical functions which use the carry flag and an addressable bit as the operands, and each addressable bit may be set, cleared or tested in a jump instruction. flags instructions that affect flags generated by the alu are as follows. instruction flag c ov ac add x x x addc x x x subb x x x mul 0 x div 0 x d a x rrc x
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 47 of 56 rlc x setb c 1 clrc 0 cplc x anl c, bit x anl c, /bit x orl c, bit x orl c, /bit x mov c, bit x cjne x table 16 instructions that affect alu flag settings in the above table , a 0 means the flag is always cleared, a 1 means the flag is always set, and an x means that the state of the flag depends on the result of the operation.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 48 of 56 instruction table arithmetic mnemonic description bytes cycles hex code add a,rn add register to a 1 1 28-2f add a,dir add direct byte to a 2 1 25 add a,@ri add data memory to a 1 1 26-27 add a,#data add immediate to a 2 1 24 addc a,rn add register to a with carry 1 1 38-3f addc a,dir add direct byte to a with carry 2 1 35 addc a,@ri add data memory to a with carry 1 1 36-37 addc a,#data add immediate to a with carry 2 1 34 subb a,rn subtract reg . from a with borrow 1 1 98-9f subb a,dir subtract direct from a with borrow 2 1 95 subb a,@ri subtract indirect from a with borrow 1 1 96-97 subb a,#data subtract imm. from a with borrow 2 1 94 inc a increment a 1 1 04 inc rn increment register 1 1 08-0f inc dir increment direct byte 2 1 05 inc @ri increment data memory 1 1 06-07 dec a decrement a 1 1 14 dec rn decrement register 1 1 18-1f dec dir decrement direct byte 2 1 15 dec @ri decrement data memory 1 1 16-17 inc dptr increment data pointer 1 2 a3 mul ab multiply a by b 1 4 a4 div ab divide a by b 1 4 84 da a decimal adjust a 1 1 d4 logical anl a,rn and register to a 1 1 58-5f anl a,dir and direct byte to a 2 1 55 anl a,@ri and data memory to a 1 1 56-57 anl a,#data and immediate to a 2 1 54 anl dir,a and a to direct byte 2 1 52 anl dir,#data and immediate data to direct byte 3 2 53 orl a,rn or register to a 1 1 48-4f orl a,dir or direct byte to a 2 1 45 orl a,@ri or data memory to a 1 1 46-47 orl a,#data or immediate to a 2 1 44 orl dir,a or a to direct byte 2 1 42 orl dir,#data or immediate data to direct byte 3 2 43 xrl a,rn exclusive-or register to a 1 1 68-6f xrl a,dir exclusive-or direct byte to a 2 1 65
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 49 of 56 mnemonic description bytes cycles hex c ode xrl a, @ri exclusive-or data memory to a 1 1 66-67 xrl a,#data exclusive-or immediate to a 2 1 64 xrl dir,a exclusive-or a to direct byte 2 1 62 xrl dir,#data exclusive-or immediate to direct byte 3 2 63 clr a clear a 1 1 e4 cpl a complement a 1 1 f4 swap a swap nibbles of a 1 1 c4 rl a rotate a left 1 1 23 rlc a rotate a left through carry 1 1 33 rr a rotate a right 1 1 03 rrc a rotate a right through carry 1 1 13 data transfer mov a,rn move register to a 1 1 e8-ef mov a,dir move direct byte to a 2 1 e5 mov a,@ri move data memory to a 1 1 e6-e7 mov a,#data move immediate to a 2 1 74 mov rn,a move a to register 1 1 f8-ff mov rn,dir move direct byte to register 2 1 a8-af mov rn,#data move immediate to register 2 2 78-7f mov dir,a move a to direct byte 2 1 f5 mov dir,rn move register to direct byte 2 2 88-8f mov dir,dir move direct byte to direct byte 3 2 85 mov dir,@ri move data memory to direct byte 2 2 86-87 mov dir,#data move immediate to direct byte 3 2 75 mov @ri,a move a to data memory 1 1 f6-f7 mov @ri,dir move direct byte to data memory 2 2 a6-a7 mov @ri,#data move immediate to data memory 2 1 76-77 mov dptr,#data move immediate to data pointer 3 2 90 movc a,@a+dptr move code byte relative dptr to a 1 2 93 movc a,@a+pc move code byte relative pc to a 1 2 83 movx a,@ri move external data(a8) to a 1 2 e2-e3 movx a,@dptr move external data(a16) to a 1 2 e0 movx @ri,a move a to external data(a8) 1 2 f2-f3 movx @dptr,a move a to external data(a16) 1 2 f0 push dir push direct byte onto stack 2 2 c0 pop dir pop direct byte from stack 2 2 d0 xch a,rn exchange a and register 1 1 c8-cf xch a,dir exchange a and direct byte 2 1 c5 xch a,@ri exchange a and data memory 1 1 c6-c7 xchd a,@ri exchange a and data memory nibble 1 1 d6-d7 clr c clear carry 1 1 c3 clr bit clear direct bit 2 1 c2 setb c set carry 1 1 d3 mnemonic description bytes cycles hex c ode
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 50 of 56 setb bit set direct bit 2 1 d2 cpl c complement carry 1 1 b3 cpl bit complement direct bit 2 1 b2 anl c,bit and direct bit to carry 2 2 82 anl c,/bit and direct bit inverse to carry 2 2 b0 orl c,bit or direct bit to carry 2 2 72 orl c,/bit or direct bit inverse to carry 2 2 a0 mov c,bit move direct bit to carry 2 1 a2 mov bit,c move carry to direct bit 2 2 92 branching acall addr 11 absolute jump to subroutine 2 2 11- f1 lcall addr 16 long jump to subroutine 3 2 12 ret return from sub-routine 1 2 22 reti return from interrupt 1 2 32 ajmp addr 11 absolute jump unconditional 2 2 01- e1 ljmp addr 16 long jump unconditional 3 2 02 sjmp rel short jump (relative address) 2 2 80 jc rel jump on carry = 1 2 2 40 jnc rel jump on carry = 0 2 2 50 jb bit,rel jump on direct bit = 1 3 2 20 jnb bit,rel jump on direct bit = 0 3 2 30 jbc bit,rel jump on direct bit = 1 and clear 3 2 10 jmp @a+dptr jump indirect relative dptr 1 2 73 jz rel jump on accumulator = 0 2 2 60 jnz rel jump on accumulator != 0 2 2 70 cjne a,dir,rel compare a,direct jne relative 3 2 b5 cjne a,#d,rel compare a,immediate jne relative 3 2 b4 cjne rn,#d,rel compare reg,immediate jne relative 3 2 b8-bf cjne @ri,#d,rel compare ind,immediate jne relative 3 2 b6-b7 djnz rn,rel decrement register, jnz relative 2 2 d8-df djnz dir,rel decrement direct byte, jnz relative 3 2 d5 miscellaneous nop no operation 1 1 00 table 17 m8052 instruction set summary in table 17 , a range of continuous hex opcodes is shown . these codes are used for 8 different registers . t he register number applicable for each code is defined by the lowest three b its of the code. an example of a non-continuous block of codes is 11 f1. these codes are used for absolute jumps and calls where the top 3 bits of the code are used to store the top three bits of the destination address. the cjne instructions use the #d abbreviation for immediate data . a ll others use #data.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 51 of 56 oscillator circuit the clock selector circuit (selclk pin) selects one divider to keep the plses frequency to 3.579545mhz, regardless of the crystal selected (14.31818mhz or 21.47727mhz). to the m8052 section, the frequency corresponds to the crystal selected. selclk pin description 0 use a 21.47727 mhz crystal 1 use a 14.31818 mhz crystal table 18 correspondance b etween selclk pin and oscillator frequency reset reset synchronisation the reset* input pin is sampled in state 5 phase 2 of every machine cycle. when rst is sampled low , a device reset is performed. the port pins will go into a high impedance state as soon as the reset* goes low . after reset * is sampled high , it will take 1 or 2 clock cycles before ale or psen are driven. reset summary the rst input performs the following functions: the pc (program counter) is set to zero . the dptr (data pointer) is set to zero . the stack pointer is set to 07 hex . register bank zero is selected . ports 0, 1, 2, and 3 are set to input mode . interrupts are disabled . all interrupt priorities are set low . the timer/counters are stopped and the timer flags are cleared . the accumulator and b registers are set to zero . the uart is disabled .
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 52 of 56 special features idle mode this mode is entered by setting pcon.0 high. idle mode gates off the clock to the cpu, but not the clock to the interrupt, timer and serial port functions. idle mode is exited by asserting any enabled interrupt, restarting the cpu in the interrupt service routine. alternatively a hardware reset may be performed by pulling the reset* pin low for a minimum of 2 machine cycles. timer 2 baud rates the m8052 will not generate a uart baud rate from the internal timer when the value in rcap2 is 65535 (ffff hex).
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 53 of 56 appendix a references many references are made throughout this data sheet to the eia 600 series of documents, which specify the cebus standard. these documents are available through global engineering, and can be obtained as follows: on-line: http://www.cebus.org/global.html global@ihs.com off-line: global engineering documents 15 inverness way east englewood, colorado, 80112 ,usa phone: 1-800-854-7179 fax: 1-303-397-2740
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 54 of 56 important notice domosys corporation (domosys) reserves the right to make changes to its products or service s without notice, and advises its customers to obtain the latest version of relevant information to verify, before placing orders, that the information being relied on is current. domosys warrants performance of its semiconductor products and related software to the specifications applicable at the time of sale in accordance with domosys? standard warranty. testing and other quality control techniques are utilized to the extent domosys deems necessary to support this warranty. specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements. certain applications using semiconductor products may involve potential risks of death, personal injury, or severe property or environmental damage (?critical applications?). domosys products are not designed, intended, authorized, or warranted to be suitable for use in life-support applications, devices or systems or other critical applications. inclusion of domosys products in such applications is understood to be fully at the risk of the customer. questions concerning potential risk applications should be directed to domosys . in order to minimize risks associated with the customer?s applications, adequate design and operating safeguards should be provided by the customer to minimize inherent or procedural hazards. domosys assumes no liability for applications assistance, customer product design, software performance, or infringement of patents or services described herein. nor does domosys warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of domosys covering or relating to any combination, machine, or process in which such semiconductor products or services might be or are used.
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 55 of 56 change tracking the following changes have taken place in this document : date responsible description of change revised page(s) feb. 28, 1998 h. dufour the power down bit has been removed. pcon.1 not implemented. 3 7 feb. 28, 1998 h. dufour the power down mode is not implemented: the power down mode paragraph has been removed. 51 june 23, 1998 p. longtin replace 21.31818mhz by 21.4772mhz. 4 sept 23, 1998 a. dunn removed the ?needs external pull-up? comment from the pins p3.4, p3.6, and p3.7 3 jan 17, 199 9 a. dunn replaced "power saving mode" with "15 i/o pins". added information about pins p3.2, p3.4, p3.6, and p3.7. added note about no schmitt trigger on reset* pin. changed information about port pins retaining state for 19 oscillator cycles after reset* went low; port pins actually go into a high impedance state as soon as reset* goes lows. 1, 3 , 12 , 51 apr 7, 1999 h. dufour corrected typo ad for da in table 16 46 apr 21, 1999 a. dunn removed blank p diss specification, it was irrelevant. 5 apr 23, 1999 a. dunn fixed microcotroller typo 7 may 12, 1999 a. dunn fixed request next rcv timestamp byte typo, should have been 01 hex to ph_request instead of a1 hex 26 aug 12, 1999 a. dunn clarified description of preamble field accepted xmit state. 28 oct. 12, 19 99 h. dufour bytes used for xch a,dir corrected from 1 to 2 52 oct. 25, 1999 h. dufour bytes used for djnz dir,rel corrected from 2 to 3 hex code for movc a,@a+pc corrected from 94 to 83 52, 53 march 2000 a.g. correction to output voltage 5
march 2000 ceway ? pl-one data sheet d-cw-0100-0 4 page 56 of 56 domosys corporation 1995 , rue jean - talon sud suite 202 s ain te-foy, quebec canada g1n 4h9 tel: (418) 681-8022 fax: (418) 681-8015 e-mail: support@domosys.com www.domosys.com copyright ? 2000 , domosys corporation ceway , cebox and network solutions for the home are trademarks of domosys corporation . cebus is a registered servicemark of electronic industries association . home plug & play is a registered trademark of cebus industry council. m8052 copyrighted mentor graphics corporation . all 8052 mnemonics copyrighted intel corporation, 1980


▲Up To Search▲   

 
Price & Availability of PONE-000-01

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X